﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Dapper;
using Dapper.Contrib.Extensions;
using Weight.Base;
using Weight.Model.TableEntity;

namespace Weight.Dal.Base
{
    /// <summary>
    /// 对应关系表操作类
    /// </summary>
   public  class DalCorresponding
    {
        /// <summary>
        /// 获取对应关系列表
        /// </summary>
        /// <param name="correType">对应类型</param>
        /// <returns></returns>
        public IEnumerable<CorrespondingEntity> GetList(string correType)
        {
            string sql = "select * from Corresponding where CorrespondingType=@CorrespondingType";
            using(IDbConnection conn =SessionFactory.CreateConnection() )
            {
               return   conn.Query<CorrespondingEntity>(sql,new { CorrespondingType= correType });
            }
        }
    }
}
